#!/bin/bash

while read -r line; do
    line="${line//;/\;}"
    echo -n "${line//#/;}"
    for i in $(seq 1 7); do
	read -r line
	line="${line//;/\;}"
	echo -n " #${line//#/;}"
    done
    echo
done
